<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

include_once( "../../global.php" );
$db = new plate( $mydbhost, $mydbuser, $mydbpw, $mydbname, ALL_PS, $mydbcharset );
$iss7 = $db->select( "plate", "plate_num", "1 order by plate_num desc " );
$is7 = $db->fetch_array( $iss7 );
$iss77 = $db->select( "plate_autoadd", "id", "plate_num={$_POST['plate_num']} limit 0,1" );
$is77 = $db->fetch_array( $iss77 );
if ( $is7['plate_num'] < $_POST['plate_num'] && empty( $is77['id'] ) )
{
		$db->add_plate( $_POST, "tab.php" );
}
else
{
		$db->update_plate( $_POST, "tab.php" );
}
?>
